Repository navigation
feat: push notifications for incoming payments with privacy-safe defaults - #1235
Conversation
|
@ojonugwa14joshua-beep Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@ojonugwa14joshua-beep is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
… can check mainnet #1230 annotate contract tests with hazards, grouped by concern (#1185) #1226 verify the deployed mainnet contracts against expected-hashes (#1186) cargo test 138 passing node --test verify-deployed-hashes 13 passing #1226 is the one that matters today. contracts/expected-hashes.json has been a claim nobody re-checked since the original byte-for-byte verification was done by hand; this reads the deployed factory and wallet off the public network and compares. Given that neither contract is upgradeable, "is the thing on mainnet still the thing we built" is a question worth being able to answer in one command. #1230 adds a one-line hazard comment to the tests that guard a specific failure and groups the suite by concern. That is the kind of change that looks cosmetic and is not: a test whose purpose is written down is a test the next person does not delete. Two PRs from this group were NOT merged and have changes requested: #1234 creates app/(tabs)/airtime.tsx and app/(tabs)/offline.tsx, which collide with the existing app/airtime.tsx and app/offline.tsx -- in Expo Router a route group is not a path segment, so both resolve to the same route. It also invents frontend/mobile/src/. #1235 adds frontend/mobile/src/notifications/pushRegistration.ts, in that same tree that does not exist in this project, wired to nothing. Claude-Session: https://claude.ai/code/session_01USgemLt4Rnz4SGB1Srf3GB
Miracle656
left a comment
There was a problem hiding this comment.
Same structural problem as #1234, so this needs the same move before I can look at the substance.
The only mobile file here is:
frontend/mobile/src/notifications/pushRegistration.ts
frontend/mobile/src/ does not exist in this project. The app keeps modules in frontend/mobile/lib/ and screens in frontend/mobile/app/. Nothing under a src/ tree is reachable from the running app, and nothing in this PR imports that file, so as it stands the registration code cannot run.
What to change:
- Move it to
frontend/mobile/lib/. - Wire it to something. #1180 asks for a token registered with the user's consent and a way to revoke it, which means a settings surface, not just a module. A registration helper nobody calls does not close the issue.
- The consent and privacy part is the substance of that issue, not a detail: what a notification reveals on a lock screen is a decision for a wallet whose whole premise is privacy. Default conservatively and make it configurable.
The edits to docs/CONTRACTS_V2.md, examples/agent-tip-bot and examples/remix are unrelated to #1180. If they are deliberate improvements, send them separately — bundled here they make the PR hard to judge.
6d13733 to
378bbc3
Compare
040990b to
bc116c0
Compare
Overview
This PR adds opt-in push notifications for incoming payments: a wallet can register an Expo push token with explicit consent, revoke it at any time, and receive a notification when a payment arrives — with the amount hidden by default so a lock-screen preview does not leak balances. It also updates the contract documentation to describe the notification design and its limits given that the deployed contracts cannot be changed.
Related Issue
Changes
🔔 Push registration (mobile)
frontend/mobile/src/notifications/pushRegistration.ts🧪 Examples updated to match the new flow
examples/agent-tip-bot/src/index.tsexamples/remix/app/routes/_index.tsxexamples/remix/app/routes/payment.tsx📚 Documentation
docs/CONTRACTS_V2.mdVerification Results
No contract source was modified, so
contracts/expected-hashes.jsonis unchanged and the reproducible-build check is unaffected.pushRegistration.tsdocs/CONTRACTS_V2.md§8; client handles the pushNote on deployed contracts
This change is off-chain only. The deployed contracts expose no upgrade path, so nothing here requires a new factory or a new address, and existing wallets that already hold money are unaffected — they keep the code they were deployed with and gain notifications through the client and backend.
Closes #1180